let Koa=require("koa");

let bodyparser=require("koa-bodyparser");
let static=require("koa-static");
let router=require("./mod/index");
let tmp=require("./tmp");
let session=require("./session/index");
let models=require("./models/index");
let app=new Koa();
app.use(session(app),name());
app.use(static(__dirname));
function name(params) {
    console.log(12);
}
app.use(bodyparser());
app.use(tmp)
console.log(1);
app.use(router())
console.log(2);
(async ()=>{
    console.log('正在初始化数据表。。。');
   //await models.sync();
})();
let post=3011;
app.listen(post)
console.log(`http://localhost:${post}`);